\hypertarget{classRunnable}{}\section{Runnable类 参考}
\label{classRunnable}\index{Runnable@{Runnable}}


\hyperlink{classRunnable}{Runnable} interface 重写operator()或传进lambda  




{\ttfamily \#include $<$runnable.\+hpp$>$}



类 Runnable 继承关系图\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=143pt]{classRunnable__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public 类型}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classRunnable_abe8d3066c7305401d6f0aad8e70780f2}\label{classRunnable_abe8d3066c7305401d6f0aad8e70780f2}} 
using \hyperlink{classRunnable_abe8d3066c7305401d6f0aad8e70780f2}{sptr} = std\+::shared\+\_\+ptr$<$ \hyperlink{classRunnable}{Runnable} $>$
\begin{DoxyCompactList}\small\item\em std\+::shared\+\_\+ptr$<$\+Runnable$>$别名 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename F $>$ }\\\hyperlink{classRunnable_ab052afa8b53dd1e7c28e978962839446}{Runnable} (F \&\&f)
\begin{DoxyCompactList}\small\item\em \hyperlink{classRunnable}{Runnable} 构造函数 \end{DoxyCompactList}\item 
\hyperlink{classRunnable_a6d6ce997a7873530a2f339412e6c4935}{Runnable} (\hyperlink{classRunnable}{Runnable} \&\&rh)
\begin{DoxyCompactList}\small\item\em \hyperlink{classRunnable}{Runnable} 复制构造 \end{DoxyCompactList}\item 
\hyperlink{classRunnable_a9e4d88b5d30d6e0368c5d22a0df203ee}{Runnable} (\hyperlink{classRunnable}{Runnable} \&rh)
\begin{DoxyCompactList}\small\item\em \hyperlink{classRunnable}{Runnable} 拷贝构造不会复制functor\+\_\+ \end{DoxyCompactList}\item 
\hyperlink{classRunnable}{Runnable} \& \hyperlink{classRunnable_a572b61c98700ada8d241b122ddc80e2c}{operator=} (\hyperlink{classRunnable}{Runnable} \&\&rh)
\begin{DoxyCompactList}\small\item\em operator= 复制 \end{DoxyCompactList}\item 
\hyperlink{classRunnable}{Runnable} \& \hyperlink{classRunnable_a4dca857ef9f64534673170bc3c8b72a1}{operator=} (\hyperlink{classRunnable}{Runnable} \&rh)
\begin{DoxyCompactList}\small\item\em operator= 复制 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classRunnable_a5769222dcc4b2adca7723bfbdfa00cbb}\label{classRunnable_a5769222dcc4b2adca7723bfbdfa00cbb}} 
\hyperlink{classRunnable_a5769222dcc4b2adca7723bfbdfa00cbb}{Runnable} ()=default
\begin{DoxyCompactList}\small\item\em \hyperlink{classRunnable}{Runnable} 默认构造 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classRunnable_a08557328273d2dfd3425507b1f972fcb}\label{classRunnable_a08557328273d2dfd3425507b1f972fcb}} 
virtual \hyperlink{classRunnable_a08557328273d2dfd3425507b1f972fcb}{$\sim$\+Runnable} ()=default
\begin{DoxyCompactList}\small\item\em $\sim$\+Runnable 析构函数 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classRunnable_a38bf849dab4bbb86fc5bc6e7aff383e0}\label{classRunnable_a38bf849dab4bbb86fc5bc6e7aff383e0}} 
virtual void \hyperlink{classRunnable_a38bf849dab4bbb86fc5bc6e7aff383e0}{operator()} ()
\begin{DoxyCompactList}\small\item\em operator() 重载实现操作 \end{DoxyCompactList}\item 
bool \hyperlink{classRunnable_a3abba14a5cf19709cef2d299ee68acae}{empty} () const
\begin{DoxyCompactList}\small\item\em empty 判断内部的函数包装器是否为空 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected 属性}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classRunnable_a687268c89ddd0d1170687ba764cbc0f2}\label{classRunnable_a687268c89ddd0d1170687ba764cbc0f2}} 
std\+::unique\+\_\+ptr$<$ \hyperlink{structFunctor__base}{Functor\+\_\+base} $>$ \hyperlink{classRunnable_a687268c89ddd0d1170687ba764cbc0f2}{functor\+\_\+}
\begin{DoxyCompactList}\small\item\em 函数包装器 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
\hyperlink{classRunnable}{Runnable} interface 重写operator()或传进lambda 

\subsection{构造及析构函数说明}
\mbox{\Hypertarget{classRunnable_ab052afa8b53dd1e7c28e978962839446}\label{classRunnable_ab052afa8b53dd1e7c28e978962839446}} 
\index{Runnable@{Runnable}!Runnable@{Runnable}}
\index{Runnable@{Runnable}!Runnable@{Runnable}}
\subsubsection{\texorpdfstring{Runnable()}{Runnable()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily template$<$typename F $>$ \\
Runnable\+::\+Runnable (\begin{DoxyParamCaption}\item[{F \&\&}]{f }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



\hyperlink{classRunnable}{Runnable} 构造函数 


\begin{DoxyParams}{参数}
{\em f} & lambda \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classRunnable_a6d6ce997a7873530a2f339412e6c4935}\label{classRunnable_a6d6ce997a7873530a2f339412e6c4935}} 
\index{Runnable@{Runnable}!Runnable@{Runnable}}
\index{Runnable@{Runnable}!Runnable@{Runnable}}
\subsubsection{\texorpdfstring{Runnable()}{Runnable()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily Runnable\+::\+Runnable (\begin{DoxyParamCaption}\item[{\hyperlink{classRunnable}{Runnable} \&\&}]{rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}



\hyperlink{classRunnable}{Runnable} 复制构造 


\begin{DoxyParams}{参数}
{\em rh} & Runnable右值引用 \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classRunnable_a9e4d88b5d30d6e0368c5d22a0df203ee}\label{classRunnable_a9e4d88b5d30d6e0368c5d22a0df203ee}} 
\index{Runnable@{Runnable}!Runnable@{Runnable}}
\index{Runnable@{Runnable}!Runnable@{Runnable}}
\subsubsection{\texorpdfstring{Runnable()}{Runnable()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily Runnable\+::\+Runnable (\begin{DoxyParamCaption}\item[{\hyperlink{classRunnable}{Runnable} \&}]{rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}



\hyperlink{classRunnable}{Runnable} 拷贝构造不会复制functor\+\_\+ 


\begin{DoxyParams}{参数}
{\em rh} & Runnable引用 \\
\hline
\end{DoxyParams}


\subsection{成员函数说明}
\mbox{\Hypertarget{classRunnable_a3abba14a5cf19709cef2d299ee68acae}\label{classRunnable_a3abba14a5cf19709cef2d299ee68acae}} 
\index{Runnable@{Runnable}!empty@{empty}}
\index{empty@{empty}!Runnable@{Runnable}}
\subsubsection{\texorpdfstring{empty()}{empty()}}
{\footnotesize\ttfamily bool Runnable\+::empty (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



empty 判断内部的函数包装器是否为空 

\begin{DoxyReturn}{返回}
bool true-\/空 
\end{DoxyReturn}
\mbox{\Hypertarget{classRunnable_a572b61c98700ada8d241b122ddc80e2c}\label{classRunnable_a572b61c98700ada8d241b122ddc80e2c}} 
\index{Runnable@{Runnable}!operator=@{operator=}}
\index{operator=@{operator=}!Runnable@{Runnable}}
\subsubsection{\texorpdfstring{operator=()}{operator=()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \hyperlink{classRunnable}{Runnable}\& Runnable\+::operator= (\begin{DoxyParamCaption}\item[{\hyperlink{classRunnable}{Runnable} \&\&}]{rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



operator= 复制 


\begin{DoxyParams}{参数}
{\em rh} & 被复制的\+Runnable\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
\hyperlink{classRunnable}{Runnable}\& 
\end{DoxyReturn}
\mbox{\Hypertarget{classRunnable_a4dca857ef9f64534673170bc3c8b72a1}\label{classRunnable_a4dca857ef9f64534673170bc3c8b72a1}} 
\index{Runnable@{Runnable}!operator=@{operator=}}
\index{operator=@{operator=}!Runnable@{Runnable}}
\subsubsection{\texorpdfstring{operator=()}{operator=()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \hyperlink{classRunnable}{Runnable}\& Runnable\+::operator= (\begin{DoxyParamCaption}\item[{\hyperlink{classRunnable}{Runnable} \&}]{rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



operator= 复制 


\begin{DoxyParams}{参数}
{\em rh} & 被复制的\+Runnable\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
\hyperlink{classRunnable}{Runnable}\& 
\end{DoxyReturn}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
runnable.\+hpp\end{DoxyCompactItemize}
